.btn {
  position: relative;
  display: inline-block;
  font-weight: $btn-font-weight;
  line-height: $btn-line-height;
  color: $body-color;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  background-image: none;
  border: $btn-border-width solid transparent;
  @include button-size(
    $btn-padding-x,
    $btn-padding-y,
    $btn-font-size,
    $border-radius
  );
  box-shadow: $btn-box-shadow;
  cursor: pointer;
  transition: $btn-transition;
  &.disabled,
  &[disabled] {
    cursor: not-allowed;
    opacity: $btn-disabled-opacity;
    box-shadow: none;
  }
  &:focus,
  &.focus {
    outline: none;
    text-decoration: $link-decoration;
  }
  > * {
    // 禁用btn所有子集的鼠标事件
    pointer-events: none;
  }
}
.btn-lg {
  @include button-size(
    $btn-padding-x-lg,
    $btn-padding-y-lg,
    $btn-font-size-lg,
    $border-radius-lg
  );
}
.btn-sm {
  @include button-size(
    $btn-padding-x-sm,
    $btn-padding-y-sm,
    $btn-font-size-sm,
    $border-radius-sm
  );
}
.btn-default {
  @include button-type(
    $gray-400,
    $white,
    $border-color,
    $primary,
    $white,
    $primary
  );
}
.btn-primary {
  @include button-type($white, $primary, $primary);
}
.btn-danger {
  @include button-type($white, $danger, $danger);
}
.btn-warning {
  @include button-type($white, $warning, $warning);
}
.btn-link {
  font-weight: $font-weight-normal;
  color: $btn-link-color;
  text-decoration: $link-decoration;
  box-shadow: none;

  &:hover,
  &:focus,
  &.focus {
    color: $btn-link-hover-color;
    text-decoration: $link-decoration;
    box-shadow: none;
  }
  &:disabled,
  &.disabled {
    color: $btn-link-disabled-color;
    pointer-events: none;
  }
}
